package bean;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import dao.CategoriaDAO;

import model.Categoria;

/**
 * Session Bean implementation class PrincipalBean
 */
@Stateless
@LocalBean
public class PrincipalBean implements PrincipalBeanLocal {

	@PersistenceContext(unitName="galeradoconcurso")
	private EntityManager em;
    /**
     * Default constructor. 
     */
    public PrincipalBean() {
        // TODO Auto-generated constructor stub
    }
    public void cadastrarCategoria(Categoria c){
    	CategoriaDAO dao = new CategoriaDAO(em);
    	dao.adicionarCategoria(c);
    	
    }

}
